package com.exercise.DesignPattern.BehavioralPatterns.MediatorPattern;

//具体组件A
public class ComponentA extends Component{

    public ComponentA(Mediator mediator) {
        super(mediator);
    }

    @Override
    public void handleEvent(String event) {
        System.out.println("ComponentA handling event: "
                + event);
    }

    public void triggerEvent(String event) {
        mediator.notify(this, event);
    }
}
